/*
The surface-physics project: http://code.google.com/p/surface-physics/
Adds real world physics based on the Bullet physics engine, to bases in the Orbiter space
flight simulation software.

Written by Abhijit Nandy
License : Apache License 2.0

Bump_Task.cpp

This file implements a common class for a pointer that can  point at different type of objects.
Also contains the world transform m[16] that is a common member to both objects types
and thus can be factored out, into this class.

*/


/* Class declaration */
#include "Bump_Task.h"




/**
 * Constructor for the class. Does nothing.
 */
Bump_Task::Bump_Task(Bump_BulletBase *bb, char *strObjName)
{
	bumpBase = bb;
	strcpy(strObjectName, strObjName);
	physicsInited = false;
	deleteIfInactive = false;
}


/**
 * Destructor, does nothing currently
 */
Bump_Task::~Bump_Task()
{}


/**
 * Create a new object meant to be injected into the Orbiter and Bullet world
 * simultaneously
 *
 *	To deal with R6025 run-time error in Visual C++: Pure virtual function call
 *	Call  DebugBreak() to break the debugger when this error is seen
 *	http://support.microsoft.com/kb/125749
 *
 *	This function is not pure virtual, but this error has still been encountered once.
 */
int
Bump_Task::init()
{
	//DebugBreak();
	return 0;
}


/**
 * Called before the Bullet sim step to apply forces
 * Will be implemented by derived classes.
 */
int
Bump_Task::prestep(double SimT, double SimDT, double MJD)
{
	//DebugBreak();
	return 0;
}


/**
 * Updates(transforms) the Orbiter object according to changes in its Bullet object
 * Will be implemented by derived classes.
 *
 * Called after Bullet sim step.
 */
int
Bump_Task::poststep(double SimT, double SimDT, double MJD)
{
	//DebugBreak();
	return 0;
}


/**
 * Deallocates memory, will be implemented by derived class
 */
int
Bump_Task::exit()
{
	//DebugBreak();
	return 0;
}


/**
 *	Resets this component
 */
int
Bump_Task::reset()
{
	return 0;
}
